package com.ssm.base.model;

import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

import tk.mybatis.mapper.entity.Config;

/**
*
*suae  2016年7月6日
*@return
*/
public class Congiguration {

	private static Logger logger = Logger.getLogger(Congiguration.class);
	
	private static  Map<String, String> map = new HashMap<String, String>();
	
	public static String getString(String key) {
		return map.get(key);
	}

	public static void setConfig(String key, String value) {
		map.put(key,value);
	}

	public static Map<String,String> toMap(){
		return map;
	}

	public static Integer getInteger(String key){
		try{
			return Integer.parseInt(map.get(key));
		}catch(Exception e){
			logger.error(e.getMessage());
			return 0;
		}
	}
}
